package com.szalay.useradmin;

import java.io.File;
import java.util.Dictionary;
import org.osgi.service.useradmin.Role;

/**
 * Role implementation.
 */
class RoleImpl implements Role {
    private final String name;
    private final WriteBackDictionary dictionary;
    
    RoleImpl(String name, File storage) {
        this.name = name;
        this.dictionary = new WriteBackDictionary(storage, "properties");
    }
    
    @Override
    public String getName() {
        return name;
    }

    @Override
    public int getType() {
        return ROLE;
    }

    @Override
    public Dictionary getProperties() {
        return dictionary;
    }
}
